<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    // includes是字符和数组的一个扩展。
    {
        // const str = "abcdefg";
        // console.log(str.includes("c"));// true
        // console.log(str.includes("ce"));// false
    }
    {
        // const arr = [1,2,3,4];
        // console.log(arr.includes(1));// true
        // console.log(arr.includes(11));// false
    }
    {
        const arr = [{name:"one"},{name:"two"}];
        console.log(arr.includes({name:"two"}));// true 1  false 2
    }
</script>
</html>